#include "Triangle.h"
//----------------------------------------------------------------
ns::Triangle::Triangle()
:
Shape()
{
	m_pVertices = NULL;
	m_pVertices = new ColorVertex[3];//es de shape
	iCantVertices = 3;

	float size = 0.1f;

	m_pVertices[0].x = -size;
	m_pVertices[0].y = -size;
	m_pVertices[0].z = 0.0f;

	m_pVertices[1].x = -size;
	m_pVertices[1].y = size;
	m_pVertices[1].z = 0.0f;

	m_pVertices[2].x = size;
	m_pVertices[2].y = -size;
	m_pVertices[2].z = 0.0f;
}
//----------------------------------------------------------------
ns::Triangle::~Triangle()
{
}
//----------------------------------------------------------------
void ns::Triangle::Draw(Renderer* renderer)
{
	ns::Shape::Draw(renderer);
	renderer->Draw(m_pVertices, PrimitiveType::TriangleStrip, iCantVertices);
}